import java.util.ArrayList;
import java.util.Iterator;

/**
 * @author げっしょく
 * @date 2021/7/23
 */
public class remof {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("d");
        list.add("d");
        list.add("e");
        list.add("a");
        list.add("f");
        list.add("d");
        list.removeIf( s -> "d".equals(s));
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }
}
